package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2025/5/28
 */
    
/**
 * 须知表
 */
@Data
@TableName(value = "t_information")
public class Information {
    /**
     * PULSE:幺豆须知 MALL:商城须知
     */
    @TableField(value = "information_type")
    private String informationType;

    /**
     * 须知内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 员工id
     */
    @TableField(value = "emp_id")
    private Long empId;

    /**
     * 员工名字
     */
    @TableField(value = "emp_name")
    private String empName;

    /**
     * 版本号
     */
    @TableField(value = "version")
    @Version
    private Integer version;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;

    @AllArgsConstructor
    @Getter
    public enum Enums {
        PULSE,
        MALL,
        ;
    }

    public static final Map<String, String> ENUM_MAP = new HashMap<>();

    static {
        ENUM_MAP.put(Information.Enums.PULSE.toString(), "幺豆须知");
        ENUM_MAP.put(Information.Enums.MALL.toString(), "商城须知");
    }

    public static boolean isContainsKey(String key) {
        return ENUM_MAP.containsKey(key);
    }


}